package com.zrrd.io.byteStream;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author WanJl
 * @version 1.0
 * @title FileOutputStreamDemo01
 * @description
 * @create 2023/9/23 16:31
 */
public class FileOutputStreamDemo01 {
    public static void main(String[] args) throws IOException {
        //1、创建字节输出流对象
        FileOutputStream out = new FileOutputStream("D:/aaa.txt");
        //2、调用字节输出流对象的写数据方法
        String str="张三,Hello World";

        out.write(str.getBytes());

        //3、释放资源
        out.close();
    }

}
